<?php
class archive_widgetWidget extends Widget {

	public function render(){
        
        //instance model
        $post_model = $this->model('posts');
        
        $date_data = $post_model->execute("SELECT DISTINCT CONCAT(YEAR(`date_added`), '-', MONTH(`date_added`)) AS date FROM `posts`");
        
        //display widget
        include $this->view();
	}
}